{include file="lib/front_header.html"}
<form action="register/reging" method="post">
  	<div class="form_box">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mtb30">
			<input type="hidden" name="info[email]" value="{$email}">
	  		<tbody>
		  		<tr>
		  			<td width="72" class="tar"><label>用户名</label></td>
		  			<td><input name="info[name]" type="text" class="txt" onBlur="checkname(this.value)">
		  					<div style="margin: 10px 0" class="small fnt_red"><span id="checkname"></span></div>
		  			</td>
		  		</tr>
		  		<tr>
		  			<td class="tar"><label>设置密码</label></td>
		  			<td><input name="info[password]" type="password" class="txt" onBlur="pwStrength(this.value)">
								<div style="margin: 10px 0" class="small"><span id="strength_L" class="pdjk">弱</span><span id="strength_M" class="pdjk">中</span><span id="strength_H" class="pdjk">强</span></div>
						</td>
		  		</tr>

		  		<tr>
		  			<td class="tar"><label>确认密码</label></td>
		  			<td><input name="info[re_password]" type="password" class="txt"></td>
				</tr>
				
		  		<tr>
		  			<td class="tar"><label>验证码</label></td>
					<td><input name="info[conf_code]" type="text" class="txt" style="width:120px">
						<img src="login/yzm?s={time()}" height="31px" width="77px" id="yzm"/>
						<a href="" style="text-decoration: underline;" id='hyh'>换一换</a>
					</td>
				</tr>
			
		  		<tr>
					<td colspan="2" class="tac"><input name="" type="submit" value="立即注册" class="btn_1 mtb20"> </td>
				</tr>
		  		<tr>
					<td colspan="2" class="tac">
						<a href="login/index">直接登陆</a>
						<span style="cursor:pointer;" id='xy'>查看协议</span>
					</td>
		  		</tr>
	  		</tbody>
	  	</table>
	</div>
</form>
<script>
	$('#xy').click(function(){
		window.open('register/agreen', 'xy', "toolbar=no,status=no,resizable=yes,width=500,height=600") ;

	});
	

	$('#hyh').click(function(){
	
		$('#yzm').attr('src','login/yzm?s='+Math.random());
		return false;
		
	
	});

</script>　　


<script type="text/javascript"> 
 function checkStrong(sPW){ 
  if (sPW.length<=4){
   Modes=1; 
  }else if(sPW.length<=13){
   Modes=2;
  }else{
   Modes = 0;
  }
  return Modes; 
 } 

 function pwStrength(pwd){ 
  O_color="#eeeeee"; 
  L_color="#FF0000"; 
  M_color="#FF9900"; 
  H_color="#33CC00"; 
  if (pwd==null||pwd==""){ 
   Lcolor=Mcolor=Hcolor=O_color; 
  } else{ 
   S_level=checkStrong(pwd); 
   switch(S_level) { 
    case 0: 
     Lcolor=Mcolor=Hcolor=L_color; 
     break;
    case 1: 
     Lcolor=L_color; 
     Mcolor=Hcolor=O_color; 
     break; 
    case 2:
     Lcolor=Mcolor=L_color;
     Hcolor=O_color;
     break;
    default: 
    Lcolor=Mcolor=Hcolor=H_color; 
     break;
  } 
  
  document.getElementById("strength_L").style.backgroundColor=Lcolor;
  document.getElementById("strength_M").style.backgroundColor=Mcolor;
  document.getElementById("strength_H").style.backgroundColor=Hcolor;
  /*
  document.t1.strength_L.style.backgroud=Lcolor; 
  document.t1.strength_M.style.backgroud=Mcolor; 
  document.t1.strength_H.style.backgroud=Hcolor; 
  */
  } 
 }


function checkname (name) {
	if (name.length>20) {
		$("#checkname").html('不能超过20个字符');
	};
}

$("form").submit(function(){
	var name = $("input[name='info[name]']").val();
	if (name.length>20) {
		alert('用户名不能超过20个字符');
		return false;
	};
});
</script>
{include file="lib/front_footer.html"}
